package com.shangyueshang.model;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * @author JokeyFeng
 * @date: 2022/1/3
 * @project: shangyueshang
 * @package: com.shangyueshang.model
 * @comment: 部门机构管理表
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class SysDept extends BaseModel implements Serializable {

    /**
     * 部门名称
     */
    private String name;

    /**
     * 上级机构ID，一级机构ID为0
     */
    private Long parentId;

    /**
     * 排序
     */
    private Integer orderNum;

    @TableField(exist = false)
    private List<SysDept> children;

    @TableField(exist = false)
    private String parentName;

    @TableField(exist = false)
    private Integer level;
}
